package com.uwlaser.modules.system.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.uwlaser.base.CommonModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* @author liuzhihui
* @date 2022-04-04
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("sys_logs_plant")
public class SysLogsPlant extends CommonModel<SysLogsPlant> implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type= IdType.ASSIGN_ID)
    private Integer id;

    @ApiModelProperty(value = "请求接口")
    private String requestclassname;

    @ApiModelProperty(value = "请求内容")
    private String requestcontent;

    @ApiModelProperty(value = "错误信息")
    private String errormsg;

    @ApiModelProperty(value = "重试次数")
    private Integer retrynum;

    @ApiModelProperty(value = "创建时间")
    private Date createtime;

    @ApiModelProperty(value = "请求方法")
    private String requestmethodname;

    @ApiModelProperty(value = "请求接口名称")
    private String requestportname;

    public void copyFrom(SysLogsPlant source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
